package com.vanke.vms.management.action;

import java.awt.Color;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xssf.usermodel.extensions.XSSFCellBorder;

import com.vanke.vms.common.action.BaseAction;
import com.vanke.vms.common.domain.Info;
import com.vanke.vms.common.domain.Pair;
import com.vanke.vms.common.domain.User;
import com.vanke.vms.common.domain.forModify;
import com.vanke.vms.management.service.ViewInfoService;

public class ViewInfoAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6531074941143295039L;

	private ViewInfoService viewInfoService;

	private int role;


	private String whichKey;

	private String viewKey;

	private String viewValue;

	// 要查看的column的名称的列表
	private List<Pair> allViewList;
	private Map<String,String> allViewMap;
	
	private List<Pair> selectedViewList;//被勾选的固定信息
	private List<String> addiViewList;//被勾选的活动信息
	private List<Pair> allSelectedViewList;//被勾选的全部信息
	private List<forModify> allValue;

	private List<Map<String, String>> infoMapList;

	private InputStream excelStream;

	//////////导出excel
	public String downInfo(){
		User curUser = (User)session.get("user");
		if(curUser == null)
			return LOGIN;
		if(curUser.getGrade() == 2)
			role = 2;
		else if(curUser.getGrade() == 1)
			role = 1;
		else if(curUser.getGrade() == 0)
			role = 0;
		
		acquireInfo();
		XSSFWorkbook wb = createwb();
		ByteArrayOutputStream os = new ByteArrayOutputStream();
		try {
			wb.write(os);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		byte[] content = os.toByteArray();
		excelStream = new ByteArrayInputStream(content);
		return "dlsuccess";
	}
	
	private XSSFWorkbook createwb(){
		XSSFWorkbook wb = new XSSFWorkbook();
		XSSFSheet sheet = wb.createSheet();
		sheet.createRow(allValue.size()+5);
		
		XSSFRow title = sheet.createRow(0);
		XSSFCell titleCell = title.createCell(0);
		titleCell.setCellValue("苏南万科客户全生命周期管理表");
		
		CellStyle titleStyle = wb.createCellStyle();
		titleStyle.setAlignment(XSSFCellStyle.ALIGN_CENTER);
		titleStyle.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
		Font titleFont = wb.createFont();
		titleFont.setFontHeightInPoints((short)16);
		titleFont.setColor(IndexedColors.BLACK.getIndex());

		titleStyle.setFont(titleFont);
		
		Font headFont = wb.createFont();
		headFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
		headFont.setColor(IndexedColors.WHITE.getIndex());
		headFont.setFontHeightInPoints((short)10);
		
		CellStyle cellStyle = wb.createCellStyle();
		cellStyle.setFont(headFont);
		cellStyle.setAlignment(XSSFCellStyle.ALIGN_CENTER);
		cellStyle.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
		//cellStyle.setFillForegroundColor(IndexedColors.BLUE.getIndex());
		cellStyle.setFillForegroundColor(IndexedColors.DARK_BLUE.getIndex());

		cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);
		cellStyle.setBorderBottom(CellStyle.BORDER_THIN);
		cellStyle.setBorderLeft(CellStyle.BORDER_THIN);
		cellStyle.setBorderRight(CellStyle.BORDER_THIN);
		cellStyle.setBorderTop(CellStyle.BORDER_THIN);
		cellStyle.setBottomBorderColor(IndexedColors.BLACK.getIndex());
		cellStyle.setTopBorderColor(IndexedColors.BLACK.getIndex());
		cellStyle.setRightBorderColor(IndexedColors.BLACK.getIndex());
		cellStyle.setLeftBorderColor(IndexedColors.BLACK.getIndex());
		
		titleCell.setCellStyle(titleStyle);
		sheet.addMergedRegion(new CellRangeAddress(0, 2, 0, allSelectedViewList.size()-1));
		
		for(int i=0;i<allSelectedViewList.size();i++){
			sheet.autoSizeColumn(i+1, true);
		}
		
		XSSFRow rowPname = sheet.createRow(3);
		XSSFRow rowCname = sheet.createRow(4);


		
		boolean flag = false;//表示前边有没有要合并的Pname
		int startColumn = 0;
		String curPname = "";
		for(int i=0;i<allSelectedViewList.size();i++){
			String curCname = allSelectedViewList.get(i).getPname();
			if(curCname.equals("房修重点业主") ||curCname.equals("重点投诉业主") ||curCname.equals("物业重点业主") ||curCname.equals("是否发生过法律纠纷")){
				flag = true;
				if(!curPname.equals("投诉情况")){
					curPname = "投诉情况";
					startColumn = i;
					XSSFCell cellPname = rowPname.createCell(i);
					XSSFCell cellCname = rowCname.createCell(i);
					cellPname.setCellValue(curPname);
					cellCname.setCellValue(curCname);
					
					cellPname.setCellStyle(cellStyle);
					cellCname.setCellStyle(cellStyle);
				}
				else{
					XSSFCell cellCname = rowCname.createCell(i);
					cellCname.setCellValue(curCname);
					
					cellCname.setCellStyle(cellStyle);
				}
			}
			else if(curCname.equals("优乐卡号") ||curCname.equals("优乐卡积分") ||curCname.equals("优乐社区用户") ||curCname.equals("社团成员")){
				if(!curPname.equals("社区属性")){
					if(flag){
						sheet.addMergedRegion(new CellRangeAddress(3, 3, startColumn, i-1));
					}
					flag = true;
					curPname = "社区属性";
					startColumn = i;
					XSSFCell cellPname = rowPname.createCell(i);
					XSSFCell cellCname = rowCname.createCell(i);
					cellPname.setCellValue(curPname);
					cellCname.setCellValue(curCname);
					
					cellPname.setCellStyle(cellStyle);
					cellCname.setCellStyle(cellStyle);
				}
				else{
					XSSFCell cellCname = rowCname.createCell(i);
					cellCname.setCellValue(curCname);
					
					cellCname.setCellStyle(cellStyle);
				}
			}
			else if(curCname.equals("楼盘属性") ||curCname.equals("签约时间")){
				if(!curPname.equals("销售阶段")){
					if(flag)
						sheet.addMergedRegion(new CellRangeAddress(3, 3, startColumn, i-1));
					flag = true;
					curPname = "销售阶段";
					startColumn = i;
					XSSFCell cellPname = rowPname.createCell(i);
					XSSFCell cellCname = rowCname.createCell(i);
					cellPname.setCellValue(curPname);
					cellCname.setCellValue(curCname);
					
					cellPname.setCellStyle(cellStyle);
					cellCname.setCellStyle(cellStyle);
				}
				else{
					XSSFCell cellCname = rowCname.createCell(i);
					cellCname.setCellValue(curCname);
					
					cellCname.setCellStyle(cellStyle);
				}
			}
			else if(curCname.indexOf(":") != -1){
				String qian = curCname.substring(0,	curCname.indexOf(":"));
				String hou = curCname.substring(curCname.indexOf(":") + 1,curCname.length());
				if(!curPname.equals(qian)){
					if(flag)
						sheet.addMergedRegion(new CellRangeAddress(3, 3, startColumn, i-1));
					flag = true;
					curPname = qian;
					startColumn = i;
					XSSFCell cellPname = rowPname.createCell(i);
					XSSFCell cellCname = rowCname.createCell(i);
					cellPname.setCellValue(qian);
					cellCname.setCellValue(hou);
					
					cellPname.setCellStyle(cellStyle);
					cellCname.setCellStyle(cellStyle);
				}
				else{
					XSSFCell cellCname = rowCname.createCell(i);
					cellCname.setCellValue(hou);
					
					cellCname.setCellStyle(cellStyle);
				}
			}
			else{//普通的格，上下只有一层的
				XSSFCell cell = rowPname.createCell(i);
				cell.setCellValue(curCname);
				
				cell.setCellStyle(cellStyle);
				
				sheet.addMergedRegion(new CellRangeAddress(3, 4, i, i));
			}
			
		}
		if(flag){
			sheet.addMergedRegion(new CellRangeAddress(3, 3, startColumn, allSelectedViewList.size()-1));
		}
		
		
		for(int i=0;i<allValue.size();i++){
			XSSFRow curRow = sheet.createRow(i+5);    
			for(int j=0;j<allValue.get(i).getListValue().size();j++){
				curRow.createCell(j).setCellValue(allValue.get(i).getListValue().get(j));
			}
		}
		
		return wb;
	}
	
	
	
	
	// 组装所有的标题的List,在进入查看用户信息的head.jsp中调用
	// 偷懒，少弄一个类。在这里，Pair的pname的值就是显示的名字，cname的值就是复选框选没选("false"),value是给固定列来确定数据库的列名的
	public String assembleList() {
		User curUser = (User)session.get("user");
		if(curUser == null)
			return LOGIN;
		if(curUser.getGrade() == 2)
			role = 2;
		else if(curUser.getGrade() == 1)
			role = 1;
		else if(curUser.getGrade() == 0)
			role = 0;
			
		
		allViewList = new ArrayList<Pair>();
		allViewList.add(new Pair("楼盘名称", "true", "houseSet"));
		allViewList.add(new Pair("楼栋", "true", "houseBuild"));
		allViewList.add(new Pair("房号", "true", "houseNumber"));
		allViewList.add(new Pair("业主姓名", "false", "holderName"));
		allViewList.add(new Pair("联系电话1", "false", "holderPhone1"));
		allViewList.add(new Pair("联系电话2", "false", "holderPhone2"));
		allViewList.add(new Pair("电子邮件", "false", "holderEmail"));
		allViewList.add(new Pair("收件人姓名", "false", "receiverName"));
		allViewList.add(new Pair("联系地址", "false", "receiverAddress"));
		allViewList.add(new Pair("证件号码", "false", "holderIdno"));
		allViewList.add(new Pair("年", "false", "year"));
		allViewList.add(new Pair("月", "false", "month"));
		allViewList.add(new Pair("日", "false", "day"));
		allViewList.add(new Pair("(农历)月", "false", "monthyin"));
		allViewList.add(new Pair("(农历)日", "false", "dayyin"));
		allViewList.add(new Pair("建筑面积(平米)", "false", "houseArea"));
		allViewList.add(new Pair("装修类型(毛坯/装修)", "false", "houseDecType"));
		allViewList.add(new Pair("是否万科员工(是/否)", "false", "isVanker"));
		allViewList.add(new Pair("是否空置(是/否)", "false", "houseFreed"));
		allViewList.add(new Pair("是否出租房(是/否)", "false", "houseLeted"));
		allViewList.add(new Pair("是否二手房(是/否)", "false", "houseUsed"));
		allViewList.add(new Pair("是否投资客(是/否)", "false", "isInvestor"));
		allViewList.add(new Pair("房修重点业主", "false", "FXfocus"));
		allViewList.add(new Pair("重点投诉业主", "false", "KFfocus"));
		allViewList.add(new Pair("物业重点业主", "false", "WYfocus"));
		allViewList.add(new Pair("是否发生过法律纠纷", "false", "lawIssue"));
		allViewList.add(new Pair("优乐卡号", "false", "youleCardNo"));
		allViewList.add(new Pair("优乐卡积分", "false", "youleCardScore"));
		allViewList.add(new Pair("优乐社区用户", "false", "youleCommunity"));
		allViewList.add(new Pair("社团成员", "false", "collegeMember"));
		allViewList.add(new Pair("楼盘属性", "false", "houseSetPro"));
		allViewList.add(new Pair("签约时间", "false", "contractedTime"));
		List<Pair> pairList = viewInfoService.assembleList();
		for (int i = 0; i < pairList.size(); i++) {
			allViewList.add(new Pair(pairList.get(i).getPname() + ":"
					+ pairList.get(i).getCname(), "false", pairList.get(i)
					.getPname()
					+ "@" + pairList.get(i).getCname()));
		}
		allViewMap = new HashMap<String,String>();
		for(int i=0;i<allViewList.size();i++){
			allViewMap.put(allViewList.get(i).getValue(), allViewList.get(i).getPname());
		}
		return SUCCESS;
	}

//	public String chooseFunc(){
//		if(whichKey.equals("2"))//搜索
//			return showInfo();
//		else
//			return downInfo();
//	}

	
	
	// 点击grandgf_selectinfo.jsp下边的“查看”按钮后执行的动作，把所有的Info+AddInfo都输出来
	public String showInfo() {
		User curUser = (User)session.get("user");
		if(curUser == null)
			return LOGIN;
		if(curUser.getGrade() == 2)
			role = 2;
		else if(curUser.getGrade() == 1)
			role = 1;
		else if(curUser.getGrade() == 0)
			role = 0;
		
		acquireInfo();
		return "ssuccess";
	}

	private void acquireInfo(){
		selectedViewList = new ArrayList<Pair>();
		addiViewList = new ArrayList<String>();
		allSelectedViewList = new ArrayList<Pair>();
		infoMapList = new ArrayList<Map<String, String>>();
		for (int i = 0; i < allViewList.size(); i++) {
			// indexof("@")是为了把固定数据和灵活数据区分开来.对Info,pname，中文，cname,英文；对addInfo，value是 大标题@小标题
			if (allViewList.get(i).getCname().equals("true")){
				allSelectedViewList.add(new Pair(allViewList.get(i).getPname(),allViewList.get(i).getValue()));
				if(allViewList.get(i).getValue().indexOf("@") == -1)
					selectedViewList.add(new Pair(allViewList.get(i).getValue(),allViewList.get(i).getPname()));
				else
					addiViewList.add(allViewList.get(i).getValue());
			}
			//selectedViewList的格式是List<Pair(英文，中文)>；addiViewList的格式是List<String(大标题@小标题)>
		}//
		if(selectedViewList.size() != 0 )
			infoMapList = viewInfoService.viewSelectedInfo(selectedViewList);//得到所有固定信息

		infoMapList = viewInfoService.viewSelectedAddiInfo(infoMapList, addiViewList);//根据固定信息的InfoId，获取AddInfo的信息，并加入到已有的Info的list中
		allValue = new ArrayList<forModify>();
		for(int i=0;i<infoMapList.size();i++){
			List<String> tmpList = new ArrayList<String>();
			for(int j=0;j<allSelectedViewList.size();j++){//allSelectedViewList:标题的List
				tmpList.add(infoMapList.get(i).get(allSelectedViewList.get(j).getPname()));
			}
			forModify oneNode = new forModify();
			oneNode.setListValue(tmpList);
			//oneNode.setInfoid(infoMapList.get(i).get("infoid"));
			oneNode.setInfoid(infoMapList.get(i).get("infoid"));
			allValue.add(oneNode);
		}
	}
	
	private void assembleAllHeadList(List<Pair> addiHeadList){
		allSelectedViewList = new ArrayList<Pair>();
		allSelectedViewList.add(new Pair("楼盘名称", ""));
		allSelectedViewList.add(new Pair("楼栋", ""));
		allSelectedViewList.add(new Pair("房号", ""));
		allSelectedViewList.add(new Pair("业主姓名", ""));
		allSelectedViewList.add(new Pair("联系电话1", ""));
		allSelectedViewList.add(new Pair("联系电话2", ""));
		allSelectedViewList.add(new Pair("电子邮件", ""));
		allSelectedViewList.add(new Pair("收件人姓名", ""));
		allSelectedViewList.add(new Pair("联系地址", ""));
		allSelectedViewList.add(new Pair("证件号码", ""));
		allSelectedViewList.add(new Pair("年", ""));
		allSelectedViewList.add(new Pair("月", ""));
		allSelectedViewList.add(new Pair("日", ""));
		allSelectedViewList.add(new Pair("农历(月)", ""));
		allSelectedViewList.add(new Pair("农历(日)", ""));
		allSelectedViewList.add(new Pair("建筑面积(平米)", ""));
		allSelectedViewList.add(new Pair("装修类型(毛坯/装修)", ""));
		allSelectedViewList.add(new Pair("是否万科员工(是/否)", ""));
		allSelectedViewList.add(new Pair("是否空置(是/否)", ""));
		allSelectedViewList.add(new Pair("是否为出租房(是/否)", ""));
		allSelectedViewList.add(new Pair("是否为投资客(是/否)", ""));
		allSelectedViewList.add(new Pair("是否为二手房(是/否)", ""));
		allSelectedViewList.add(new Pair("房修重点业主", ""));
		allSelectedViewList.add(new Pair("重点投诉业主", ""));
		allSelectedViewList.add(new Pair("物业重点业主", ""));
		allSelectedViewList.add(new Pair("是否发生过法律纠纷", ""));
		allSelectedViewList.add(new Pair("优乐卡号", ""));
		allSelectedViewList.add(new Pair("优乐卡积分", ""));
		allSelectedViewList.add(new Pair("优乐社区用户", ""));
		allSelectedViewList.add(new Pair("社团成员", ""));
		allSelectedViewList.add(new Pair("楼盘属性", ""));
		allSelectedViewList.add(new Pair("签约时间", ""));
		for(int i=0;i<addiHeadList.size();i++){
			//allSelectedViewList.add(new Pair(addiHeadList.get(i).getCname()+"("+addiHeadList.get(i).getPname()+")",""));
			allSelectedViewList.add(new Pair(addiHeadList.get(i).getPname()+":"+addiHeadList.get(i).getCname(),""));
		}
	}
	
	private void acquireSearchInfo(){
		//获得所有的AddInfo的列名,Pair的pname是pname,cname是cname
		List<Pair> allAddInfoHeadList = viewInfoService.assembleList();
		
		//组装所有的列名 - 放在allSelectedViewList中
		assembleAllHeadList(allAddInfoHeadList);
		
		List<Info> infoList;
		List<Integer> idList;
		
		if(viewKey.indexOf("@")!= -1){
			String curPname = viewKey.substring(0,viewKey.indexOf("@"));
			String curCname = viewKey.substring(viewKey.indexOf("@") + 1,viewKey.length());
			
			idList = viewInfoService.getInfoIdListByPCName(curPname, curCname,viewValue);
			infoList = viewInfoService.getAllInfoByInfoIdList(idList);
			
		}else{
			// 获取满足搜索条件的Info的List
			infoList = viewInfoService.viewInfo(viewKey, viewValue);
			idList = new ArrayList<Integer>();
			// 对这些List中的每一个Info，获取他们的InfoId放入idList(用于从AddInfo中取数据)
			for (int i = 0; i < infoList.size(); i++) {
					idList.add(infoList.get(i).getInfoId());
			}
		}
			// 对每一个InfoId，把他们对应的AddInfo的值放入一个String的List
			Map<Integer, List<String>> addInfoMap = viewInfoService.viewAddInfo(idList,allAddInfoHeadList);
			
			allValue = new ArrayList<forModify>();
			
			for(int i=0;i<idList.size();i++){
				forModify tmp = new forModify();
				tmp.setInfoid(idList.get(i).toString());
				List<String> tmpStringList = new ArrayList<String>();
				tmpStringList.add(infoList.get(i).getHouseSet());
				tmpStringList.add(infoList.get(i).getHouseBuild());
				tmpStringList.add(infoList.get(i).getHouseNumber());
				tmpStringList.add(infoList.get(i).getHolderName());
				tmpStringList.add(infoList.get(i).getHolderPhone1());
				tmpStringList.add(infoList.get(i).getHolderPhone2());
				tmpStringList.add(infoList.get(i).getHolderEmail());
				tmpStringList.add(infoList.get(i).getReceiverName());
				tmpStringList.add(infoList.get(i).getReceiverAddress());
				tmpStringList.add(infoList.get(i).getHolderIdno());
				tmpStringList.add(infoList.get(i).getYear());
				tmpStringList.add(infoList.get(i).getMonth());
				tmpStringList.add(infoList.get(i).getDay());
				tmpStringList.add(infoList.get(i).getMonthyin());
				tmpStringList.add(infoList.get(i).getDayyin());
				tmpStringList.add(infoList.get(i).getHouseArea());
				tmpStringList.add(infoList.get(i).getHouseDecType());
				tmpStringList.add(infoList.get(i).getIsVanker());
				tmpStringList.add(infoList.get(i).getHouseFreed());
				tmpStringList.add(infoList.get(i).getHouseLeted());
				tmpStringList.add(infoList.get(i).getHouseUsed());
				tmpStringList.add(infoList.get(i).getIsInvestor());
				tmpStringList.add(infoList.get(i).getFXfocus());
				tmpStringList.add(infoList.get(i).getKFfocus());
				tmpStringList.add(infoList.get(i).getWYfocus());
				tmpStringList.add(infoList.get(i).getLawIssue());
				tmpStringList.add(infoList.get(i).getYouleCardNo());
				tmpStringList.add(infoList.get(i).getYouleCardScore());
				tmpStringList.add(infoList.get(i).getYouleCOmmunity());
				tmpStringList.add(infoList.get(i).getCollegeMember());
				tmpStringList.add(infoList.get(i).getHouseSetPro());
				tmpStringList.add(infoList.get(i).getContractedTime());
				List<String> addTmpStringList = addInfoMap.get(idList.get(i));
				for(int j=0;j<addTmpStringList.size();j++){
					tmpStringList.add(addTmpStringList.get(j));
				}
				tmp.setListValue(tmpStringList);
				allValue.add(tmp);
			}

	}
	
	//search
	public String searchInfo(){
		User curUser = (User)session.get("user");
		if(curUser == null)
			return LOGIN;
		if(curUser.getGrade() == 2)
			role = 2;
		else if(curUser.getGrade() == 1)
			role = 1;
		else if(curUser.getGrade() == 0)
			role = 0;
		
		assembleList();
		acquireSearchInfo();
		return "ssuccess";
	}
	
	//search download excel
	public String searchdlInfo(){
		User curUser = (User)session.get("user");
		if(curUser == null)
			return LOGIN;
		if(curUser.getGrade() == 2)
			role = 2;
		else if(curUser.getGrade() == 1)
			role = 1;
		else if(curUser.getGrade() == 0)
			role = 0;
		
		assembleList();
		acquireSearchInfo();
		
		XSSFWorkbook wb = createwb();
		ByteArrayOutputStream os = new ByteArrayOutputStream();
		try {
			wb.write(os);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		byte[] content = os.toByteArray();
		excelStream = new ByteArrayInputStream(content);
		return "dlsuccess";
	}
	
//////////////////////////////////////////////////
	public Map<String, String> getAllViewMap() {
		return allViewMap;
	}

	public void setAllViewMap(Map<String, String> allViewMap) {
		this.allViewMap = allViewMap;
	}

	public int getRole() {
		return role;
	}

	public void setRole(int role) {
		this.role = role;
	}
	
	public InputStream getExcelStream() {
		return excelStream;
	}

	public void setExcelStream(InputStream excelStream) {
		this.excelStream = excelStream;
	}

	public List<forModify> getAllValue() {
		return allValue;
	}

	public void setAllValue(List<forModify> allValue) {
		this.allValue = allValue;
	}
	
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getWhichKey() {
		return whichKey;
	}

	public void setWhichKey(String whichKey) {
		this.whichKey = whichKey;
	}

	public String getViewKey() {
		return viewKey;
	}

	public void setViewKey(String viewKey) {
		this.viewKey = viewKey;
	}

	public String getViewValue() {
		return viewValue;
	}

	public void setViewValue(String viewValue) {
		this.viewValue = viewValue;
	}

	public List<Pair> getAllViewList() {
		return allViewList;
	}

	public void setAllViewList(List<Pair> allViewList) {
		this.allViewList = allViewList;
	}

	public List<Pair> getSelectedViewList() {
		return selectedViewList;
	}

	public void setSelectedViewList(List<Pair> selectedViewList) {
		this.selectedViewList = selectedViewList;
	}
	
	public List<Pair> getAllSelectedViewList() {
		return allSelectedViewList;
	}

	public void setAllSelectedViewList(List<Pair> allSelectedViewList) {
		this.allSelectedViewList = allSelectedViewList;
	}

	public List<String> getAddiViewList() {
		return addiViewList;
	}

	public void setAddiViewList(List<String> addiViewList) {
		this.addiViewList = addiViewList;
	}

	public List<Map<String, String>> getInfoMapList() {
		return infoMapList;
	}

	public void setInfoMapList(List<Map<String, String>> infoMapList) {
		this.infoMapList = infoMapList;
	}

	public ViewInfoService getViewInfoService() {
		return viewInfoService;
	}

	public void setViewInfoService(ViewInfoService viewInfoService) {
		this.viewInfoService = viewInfoService;
	}
}
